package game.element.block;

import game.utility.ResourceUtility;

import java.awt.Image;
import java.io.File;
import java.io.IOException;

import javax.imageio.ImageIO;

public class SimpleBlock extends AbstractBlockElement {

	public static final String TYPE = "SIMPLEBLOCK";

	private static final String SIMPLEBLOCK_IMAGE_SOURCE = ResourceUtility.getLevelElementImagePath("simple_block.png");

	private static Image SIMPLEBLOCK_IMAGE;

	static {
		try {
			SIMPLEBLOCK_IMAGE = ImageIO.read(new File(SIMPLEBLOCK_IMAGE_SOURCE));
		} catch (IOException e) {
			throw new RuntimeException(e);
		}
	}

	public SimpleBlock(int x, int y) {
		super(x, y);
		setImage(SIMPLEBLOCK_IMAGE);
		setDestroyable(true);
	}

	@Override
	public String getType() {
		return TYPE;
	}
}